import { createRouter, createWebHashHistory,useRoute } from 'vue-router'

const routes = [
  {
    path: "/",
    redirect: "/login",
  },
  {
    path: "/about",
    name: "about",
    component: () => import("../views/AboutView.vue"),
  },
  {
    path: "/login",
    name: "login",
    component: () => import("../views/login.vue"),
  },
  {
    path: "/home",
    name: "home",
    component: () => import("../views/HomeView.vue"),
    children: [
      {
        path: "/qianduan",
        name: "前端开发",
        component: () => import("../views/qianduan.vue"),
      },
      {
        path: "/shijue",
        name: "视觉设计",
        component: () => import("../views/shijue.vue"),
      },
      {
        path: "/quanzhan",
        name: "全栈开发",
        component: () => import("../views/quanzhan.vue"),
      },
      {
        path: "/rengong",
        name: "人工智能",
        component: () => import("../views/rengong.vue"),
      },
      {
        path: "/xitong",
        component: () => import("../views/xitong.vue"),
      },
    ],
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes
})


export default router
